#ifndef BINDABLE_H
#define BINDABLE_H

#include <QtOpenGL>

class Bindable
{
public:
    Bindable();
    virtual ~Bindable();

    bool isLoaded() const;
    GLuint id() const;

    virtual void bind() const = 0;
    virtual void unbind() const = 0;

    virtual void loadGPU() = 0;
    virtual void unloadGPU() = 0;

protected:
    Bindable(const Bindable&);
    Bindable& operator = (const Bindable&);

protected:
    //------------------------------------------------
    //  Attributes.
    //------------------------------------------------
    bool   m_bLoaded;
    GLuint m_uiId;
};

#endif // BINDABLE_H
